package com.party.admin.task;

import com.party.core.service.member.IMemberMerchantDetailService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 合作商统计详情任务
 * Created by wei.li.
 *
 * @date 2017/12/15 0015
 * @time 10:45
 */
@Component(value = "quartzMemberMerchantDetail")
public class  QuartzMemberMerchantDetail {

    @Autowired
    private IMemberMerchantDetailService memberMerchantDetailService;

    protected static Logger logger = LoggerFactory.getLogger(QuartzMerchantAnalyze.class);

    /**
     * 清除
     */
    public void clear(){
        try {
            memberMerchantDetailService.deleteHistory(30);
            logger.info("清除合作商统计数据");
        } catch (Exception e) {
            logger.debug("清除合作商统计数据异常", e);
        }
    }
}
